package com.aboverock.module.system.mapper;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.aboverock.module.system.domain.User;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Rock Wang
 * @since 2018-05-11
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * Gets the users with roles.
     *
     * @param start the start
     * @param pageSize the page size
     * @return the users with roles
     */
    public List<User> getUsersWithRoles(@Param("start") Long start,
            @Param("pageSize") Long pageSize);

    /**
     * Gets the user by login name with roles.
     *
     * @param loginName the login name
     * @return the by login name with roles
     */
    public User getByLoginNameWithRoles(String loginName);

    /**
     * Update user status by user id.
     *
     * @param params the params
     * @return true, if successful
     */
    public boolean updateUserStatusByUserId(Map<String, Object> params);

    /**
     * Gets the user by id ignore logic delete.
     *
     * @param id the id
     * @return the by id ignore logic delete
     */
    public User getByIdIgnoreLogicDelete(Serializable id);
}
